<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>实名制审核</title>
    {include file="include/top"}
</head>
<body>

<div class="layui-form" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-app-form-tags"
     style="padding: 20px 0 0 0;">
  {include file="include/input" readonly='readonly' class2='layui-form-item' type='text' title="昵称" name='nickname' value='<?php echo isset($data["nickname"])?$data["nickname"]:"";?>'}
  {include file="include/input" readonly='readonly' class2='layui-form-item' type='text' title="姓名" name='username' value='<?php echo isset($data["username"])?$data["username"]:"";?>'}
  {include file="include/input" readonly='readonly' class2='layui-form-item' type='text' title="手机" name='mobile' value='<?php echo isset($data["mobile"])?$data["mobile"]:"";?>'}
  {include file="include/input" readonly='readonly' class2='layui-form-item' type='text' title="身份证" name='carID' value='<?php echo isset($data["carID"])?$data["carID"]:"";?>'}
    <div class="layui-form-item">
        <label class="layui-form-label"><font color="red">状态</font></label>
        <div class="layui-input-inline">
            <select name="status">
                <option value="0"
                <?php if(isset($data['status']) && $data['status']==1){echo 'selected';} ?>>待审核</option>
                <option value="-1"
                <?php if(isset($data['status']) && $data['status']==-1){echo 'selected';} ?>>禁用</option>
                <option value="2"
                <?php if(isset($data['status']) && $data['status']==2){echo 'selected';} ?>>已审核</option>
                <option value="0"
                <?php if(isset($data['status']) && $data['status']==0){echo 'selected';} ?>>注册</option>
            </select>
        </div>
    </div>
    {if $data.status==-1}
    {include file="include/input" readonly='readonly' class2='layui-form-item' type='text' title="<font color=red>禁用原因</font>" name='content' value='<?php echo isset($data["content"])?$data["content"]:"";?>'}
    {/if}
    <div class="layui-form-item">
        <label class="layui-form-label">证件图</label>
        <div class="layui-input-inline">

            <a href="{$data.imgArr[0]}" target="_blank"><img src="{$data.imgArr[0]}" id="img" style="max-height: 200px;max-width: 200px;"></a>
            <a href="{$data.imgArr[1]}" target="_blank"><img src="{$data.imgArr[1]}" id="img" style="max-height: 200px;max-width: 200px;"></a>
        </div>
    </div>
</div>

{include file="include/js"}
<script>
    layui.config({
        base: '/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'upload'], function () {
        var $ = layui.$;
        var form = layui.form;
        var upload = layui.upload
        upload.render({
            elem: '#import'
            ,url: '/includes/upload' //改成您自己的上传接口
            ,before:function () {
                $load = layer.load();
            }
            ,auto: true
            ,exts: 'jpg|png' //只允许上传压缩文件
            //,multiple: true
            // ,bindAction: '#test9'
            ,done: function(res){
                layer.closeAll();
                if(res.code==1){
                    layer.msg(res.src);
                }else{
                    layer.msg('上传成功');
                    $("#import").val(res.data.src);
                    $("#img2").attr("src",res.data.src);
                }
            },error:function () {
                layer.closeAll();
            }
        });
    });
</script>
</body>
</html>